<?php
 require './lib/ConnectDB.php';
$connect = ConnectDB::getInstace(); 
$id_user = addslashes(mysqli_real_escape_string($connect->cDB(),$_GET['user']));
$rank = (int)addslashes(mysqli_real_escape_string($connect->cDB(),$_GET['r']));

if(empty($id_user) !=true && is_int($rank)==true){
    if($rank===1 || $rank===0)
    $connect->cDB()->query("UPDATE users SET rank='$rank' WHERE id_user='$id_user'");
   header("Location:users.php");
}